package org.dromara.blog.domain.bo;

import org.dromara.blog.domain.BlogComment;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

/**
 * 博客评论业务对象 blog_comment
 *
 * @author LSY
 * @date 2025-11-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BlogComment.class, reverseConvertGenerate = false)
public class BlogCommentBo extends BaseEntity {

    /**
     * 评论ID
     */
    @NotNull(message = "评论ID不能为空", groups = { EditGroup.class })
    private Long commentId;

    /**
     * 文章ID
     */
    @NotNull(message = "文章ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long articleId;

    /**
     * 父评论ID（0为顶级）
     */
    private Long parentId;

    /**
     * 祖级ID链
     */
    private String ancestors;

    /**
     * 评论内容
     */
    @NotBlank(message = "评论内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String content;

    /**
     * 访客昵称
     */
    private String visitorName;

    /**
     * 访客邮箱
     */
    private String visitorEmail;

    /**
     * 访客IP
     */
    private String visitorIp;

    /**
     * 点赞数
     */
    private Long likeCount;

    /**
     * 回复数
     */
    private Long replyCount;

    /**
     * 是否已审核（1是 0否）
     */
    private String isAudited;

    /**
     * 排序
     */
    private Long sort;

    /**
     * 备注
     */
    private String remark;

    /**
     * 状态（0正常 1停用）
     */
    private String status;


}
